﻿Imports CrystalDecisions.CrystalReports.Engine

Public Class frmSaleDiagram
    Private Sub loadRpt()
        Dim cryRpt As New ReportDocument
        Dim path As String = IIf(radioMost.Checked, "\CrystalReport\SaleDiagramUp.rpt", "\CrystalReport\SaleDiagramDown.rpt")

        cryRpt.Load(Application.StartupPath + path)
        cryRpt.SetParameterValue("startDate", dtpstart.Value)
        cryRpt.SetParameterValue("endDate", dtpend.Value)
        crviewerr.ReportSource = cryRpt
        crviewerr.Zoom(75)
        crviewerr.Refresh()
    End Sub

    Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click
        loadRpt()
    End Sub
End Class